import Vue from 'vue'
import Vuex from 'vuex'

Vue.use(Vuex)

export default new Vuex.Store({
  state: {
    count: 1
  },
  mutations: {
    addMain (qq, ee) {
      console.log(ee)
      qq.count += ee
    },
    addTow (state, haha) {
      state.count -= haha
    } 
  },  
  actions: {      
    a1 (con, asy) {   
      setTimeout(() => {
        // console.log(con)
        con.commit('addTow', asy)
      }, 2000)
    }
  },
  modules: {
  }
})
